<template>
  <div class="main">
    <div :class="classValue"></div>
    <router-view></router-view>
  </div>
</template>
<script>
export default {
  name: "MainPage",
  computed:{
    classValue(){
        let routerIndex = this.$store.state.routerIndex
        if (routerIndex == 0) {
            return 'no-full'
        } else {
            return 'full'
        }
    }
  }
};
</script>

<style scoped>
.main {
  display: flex;
  margin-top: 40px;
}
.full{
    min-width: 240px;
}
.no-full{
    width: 0;
}
</style>